package org.example.viteVantDemo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.example.viteVantDemo.entity.UserAssets;
import org.springframework.security.core.parameters.P;

import java.math.BigDecimal;

@Mapper
public interface UserAssetsMapper extends BaseMapper<UserAssets> {
    @Update("update t_user_assets set fund_balance = #{lastBalance} where user_id = #{userId}")
    void updateBalanceByUserId(@Param("userId")Integer userId, @Param("lastBalance") BigDecimal lastBalance);
}